
public class Board {
	/**
	 * Called by Game class
	 * 
	 * @author Larry Savago
	 * @author Casey Huckins
	 * @date 4/13/2012
	 */
	static final int ROWS = 3;
	static final int COLS = ROWS;
	//private Square[] ideal = new Square[(COLS/Ship.SIZE)*ROWS];
	private Square[][] board = new Square[ROWS][COLS];
	
	// set square ids for trouble shooting
	public Board() { 
		int pos = 0;
		int i;
		for (i=0;i<ROWS;i++){
			for (int p=0; p<COLS;p++){
				board[i][p] = new Square();
				board[i][p].setId(i,p);
				// build ideal search 
			}
		}
	}
	public Square getSquare(int row, int col) {
		return board[row][col];
	}
	
	public void setSquare(int row, int col, Square s) {
		board[row][col] = s;
	}

	public String toString() {
		String s = "";
		for (int i=0;i<ROWS;i++){
			for (int p=0; p<COLS;p++){
				s = s + board[i][p].toString();
			}
			s = s + "\n";
		}
		return s;
	}
}
